<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }
        #father{
            margin: 20px auto;
            height:300px;
            width:300px;
            border:1px solid red;
            padding: 10px;
            /*将自身定位参照物*/
            position: relative;
        }
        p{
            /*相对于父级进行偏移*/
            position: absolute;
            left: 200px;
        }
    </style>

</head>
<body>
<div id="father">
    <p>haha</p>
</div>
</body>
</html>